package day07;

import com.sun.security.auth.NTSidPrimaryGroupPrincipal;
import sun.plugin2.applet.context.NoopExecutionContext;

public class PrimeNumber {
    public static void main(String[] args) {
        for (int num=2;num<=100;num++){
            boolean flag=true;
            for (int i=2;i<=num/2;i++){
                if (num%2==0){
                    flag=false;
                    break;
                }
            }
            if (flag){
                System.out.print(num+"\t");
            }
        }














       /* int n=20;
        boolean fl=true;
        for (int i=2;i<n/2;i++){
            if (n%i==0){
                fl=false;
                break;
            }
        }
        if (fl){
            System.out.println("是素数");
        }else {
            System.out.println("不是素数");
        }

        for(int num=2;num<=100;num++){
            boolean flag=true;
            for (int i=2;i<=num;i++){
                if (num%i==0){
                    flag=false;
                    break;
                }
            }
            if (flag){
                System.out.print(num+"\t");
            }
        }*/

    }
}
